import request from '@/utils/request'

// 查询食材类型列表
export function listFoodType(query) {
  return request({
    url: '/manage/foodType/list',
    method: 'get',
    params: query
  })
}

// 查询食材类型详细
export function getFoodType(foodTypeId) {
  return request({
    url: '/manage/foodType/' + foodTypeId,
    method: 'get'
  })
}

// 新增食材类型
export function addFoodType(data) {
  return request({
    url: '/manage/foodType',
    method: 'post',
    data: data
  })
}

// 修改食材类型
export function updateFoodType(data) {
  return request({
    url: '/manage/foodType',
    method: 'put',
    data: data
  })
}

// 删除食材类型
export function delFoodType(foodTypeId) {
  return request({
    url: '/manage/foodType/' + foodTypeId,
    method: 'delete'
  })
}
